package com.bingquan.company.controller;

import com.bingquan.company.feign.TokenFeign;
import com.bingquan.company.model.WorkFlowRequestParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/test")
public class TestFeignController {

    @Autowired
    private TokenFeign tokenFeign;

    @PostMapping(name = "feign call test", path = "feign")
    public Object test(@RequestHeader("token") String token, @RequestBody WorkFlowRequestParam param) {
        System.out.println(token + "===========");
        tokenFeign.getUserId(token,param);
        System.out.println("feign call success");
        return null;


    }

}
